package com.xinchuang.controller;

import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xinchuang.role.config.RoleConfig;
import com.xinchuang.role.entity.SystemHeader;
import com.xinchuang.service.actual.TestNoticeTimeTableService;
import com.xinchuang.utils.MyUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import com.xinchuang.utils.CheckUtil;
import com.xinchuang.comment.R;
import com.xinchuang.comment.ResultCode;
import com.google.gson.Gson;

import java.text.SimpleDateFormat;

import com.xinchuang.utils.DateUtils;
import org.springframework.web.multipart.MultipartFile;
import org.apache.commons.lang3.StringUtils;
import com.xinchuang.service.TryOutModService;

/**
 * TryOutModController
 *
 * @date 2023-07-05
 */
@RestController
@RequestMapping("/tryOutMod")
@Api(value = "开始试模模块", tags = "开始试模模块")
public class TryOutModController {
    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    @Resource
    private TestNoticeTimeTableService timeTableService;

    /**
     * 获取试模记录详情接口接口  函数名称getTryOutReport  功能描述:
     *
     * @param jsonObject 中文名:通用实体类
     * @return 返回参数{}
     */
    @PostMapping("/getTryOutReport")
    @ApiOperation("获取试模记录详情接口")
    public R getTryOutReport(@RequestBody JSONObject jsonObject) {
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        Set<String> sSet = new HashSet<>();
        String result = jsonLoop(jsonObject, "", methodName + "SC", sSet);
        result = result + getTryOutReportACS(sSet);
        if (result.length() > 0) {
            return R.fail("入参：" + result);
        }
        // 调用业务层代码
        String r = timeTableService.getTryOutReport(jsonObject);
        return JSON.parseObject(r, R.class);
    }

    @PostMapping("/exportTryOutReport")
    @ApiOperation("导出试模报告单接口")
    public R exportTryOutReport(@RequestBody JSONObject jsonObject, HttpServletResponse response) {
        String r = timeTableService.exportTryOutReport(jsonObject, response);
        return JSON.parseObject(r, R.class);
    }

    /**
     * 获取试模记录时间详情接口接口  函数名称getTryOutRecord  功能描述:
     *
     * @param jsonObject 中文名:通用实体类
     * @return 返回参数{}
     */
    @PostMapping("/getTryOutRecord")
    @ApiOperation("获取试模记录时间详情接口")
    public R getTryOutRecord(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
        // 调用业务层代码
        String r = timeTableService.getTryOutRecord(jsonObject, request);
        return JSON.parseObject(r, R.class);
    }

    /**
     * 获取试模列表接口接口  函数名称getTryOutRecordList  功能描述:
     *
     * @param jsonObject 中文名:通用实体类
     * @return 返回参数{}
     */
    @PostMapping("/getTryOutRecordList")
    @ApiOperation("获取试模列表接口")
    public R getTryOutRecordList(@RequestBody JSONObject jsonObject) {
        String r = timeTableService.getTryOutRecordList(jsonObject);
        return JSON.parseObject(r, R.class);
    }

    /**
     * 保存试模记录接口接口  函数名称addTryOutRecord  功能描述:
     *
     * @param jsonObject 中文名:通用实体类
     * @return 返回参数{}
     */
    @PostMapping("/addTryOutRecord")
    @ApiOperation("保存试模记录接口")
    public R addTryOutRecord(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
        // 调用业务层代码
        String r = timeTableService.addTryOutRecord(jsonObject, request);
        return JSON.parseObject(r, R.class);
    }

    /**
     * 保存试模报告接口接口  函数名称addTryOutReport  功能描述:
     *
     * @param jsonObject 中文名:通用实体类
     * @return 返回参数{}
     */
    @PostMapping("/addTryOutReport")
    @ApiOperation("保存试模报告接口")
    public R addTryOutReport(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
        // 调用业务层代码
        String r = timeTableService.addTryOutReport(jsonObject, request);
        return JSON.parseObject(r, R.class);
    }

    /**
     * 提交试模报告接口接口  函数名称postTryOutReport  功能描述:提交报告之后不能再进行修改。用于记录试模状态
     *
     * @param jsonObject 中文名:通用实体类
     * @return 返回参数{}
     */
    @PostMapping("/postTryOutReport")
    @ApiOperation("提交试模报告接口")
    public R postTryOutReport(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        Set<String> sSet = new HashSet<>();
        String result = jsonLoop(jsonObject, "", methodName + "SC", sSet);
        result = result + postTryOutReportACS(sSet);
        if (result.length() > 0) {
            return R.fail("入参：" + result);
        } else {
            // 调用业务层代码
            String r = timeTableService.postTryOutReport(jsonObject, request);
            Set<String> aSet = new HashSet<>();
            JSONObject o = JSON.parseObject(r);
            if (o == null) {
                o = new JSONObject();
            }
            result = jsonLoop(o.get("data"), "", methodName + "AC", aSet);
            result = result + postTryOutReportACB(aSet);
            if (result.length() > 0) {
                return R.fail("出参：" + result);
            }
            return JSON.parseObject(r, R.class);
        }
    }


    public static String jsonLoop(Object object, String result, String methodName, Set<String> set) {
        Object v = null;
        if (object instanceof JSONArray || object instanceof ArrayList) {
            JSONArray jsonArray = new JSONArray();
            if (object instanceof ArrayList) {
                jsonArray = JSONArray.parseArray(JSON.toJSONString(object));
            } else {
                jsonArray = (JSONArray) object;
            }
            for (int i = 0; i < jsonArray.size(); i++) {
                result = jsonLoop(jsonArray.get(i), result, methodName, set);
                if (StringUtils.isNotEmpty(result)) {
                    return result;
                }
            }
        }
        if (object instanceof JSONObject) {
            JSONObject jsonObject = (JSONObject) object;
            for (Map.Entry<String, Object> entry : jsonObject.entrySet()) {
                Object o = entry.getValue();
                if (o instanceof JSONArray || o instanceof ArrayList) {
                    result += selectCheckMathod(entry.getKey(), entry.getValue(), methodName, set);
                    result = jsonLoop(o, result, methodName, set);
                    if (StringUtils.isNotEmpty(result)) {
                        return result;
                    }
                } else if (o instanceof JSONObject) {
                    result = jsonLoop(o, result, methodName, set);
                    if (StringUtils.isNotEmpty(result)) {
                        return result;
                    }
                } else {
//                   FIXME: 未知类型
                }
                v = entry.getValue();
                result += selectCheckMathod(entry.getKey(), v, methodName, set);
            }
        }
        return result;
    }

    private static String selectCheckMathod(String key, Object value, String methodName, Set<String> set) {
        String result = "";
        if ("getTryOutReportSC".equals(methodName)) {
            result = getTryOutReportSC(key, value, set);
        }
        if ("getTryOutReportAC".equals(methodName)) {
            result = getTryOutReportAC(key, value, set);
        }
        if ("getTryOutRecordSC".equals(methodName)) {
            result = getTryOutRecordSC(key, value, set);
        }
        if ("getTryOutRecordAC".equals(methodName)) {
            result = getTryOutRecordAC(key, value, set);
        }
        if ("getTryOutRecordListSC".equals(methodName)) {
            result = getTryOutRecordListSC(key, value, set);
        }
        if ("getTryOutRecordListAC".equals(methodName)) {
            result = getTryOutRecordListAC(key, value, set);
        }
        if ("addTryOutRecordSC".equals(methodName)) {
            result = addTryOutRecordSC(key, value, set);
        }
        if ("addTryOutRecordAC".equals(methodName)) {
            result = addTryOutRecordAC(key, value, set);
        }
        if ("addTryOutReportSC".equals(methodName)) {
            result = addTryOutReportSC(key, value, set);
        }
        if ("addTryOutReportAC".equals(methodName)) {
            result = addTryOutReportAC(key, value, set);
        }
        if ("postTryOutReportSC".equals(methodName)) {
            result = postTryOutReportSC(key, value, set);
        }
        if ("postTryOutReportAC".equals(methodName)) {
            result = postTryOutReportAC(key, value, set);
        }
        return result;
    }


    private static String getTryOutReportSC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("noteId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单Id", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String getTryOutReportAC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("noteId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单Id", isNull, 0, 255);
        }
        if ("temperatureValue".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "每阶段螺杆温度值", isNull, 0, 255);
        }
        if ("stageName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "阶段号", isNull, 0, 255);
        }
        if ("ejectionStageName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "阶段号", isNull, 0, 255);
        }
        if ("ejectionposition".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "位置", isNull, 0, 255);
        }
        if ("ejectionTempresure".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "压力", isNull, 0, 255);
        }
        if ("ejectionSpeed".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "速度", isNull, 0, 255);
        }
        if ("totalTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "当天合计用时总数(H)", isNull, 0, 255);
        }
        if ("costTimeRemark".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "用时记录备注", isNull, 0, 255);
        }
        if ("exceptionPeriod".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "开始结束时间段（H）", isNull, 0, 255);
        }
        if ("exceptionHour".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "时间（H）", isNull, 0, 255);
        }
        if ("waitDetailContent".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "等待详细内容", isNull, 0, 255);
        }
        if ("fixDetialContent".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "修模详细内容", isNull, 0, 255);
        }
        if ("breakdownDetialContent".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "设备故障内容", isNull, 0, 255);
        }
        if ("exceptionRemark".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "异常时间记录备注", isNull, 0, 255);
        }
        if ("debugMoldCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "调试模数", isNull, 0, 255);
        }
        if ("produceMoldCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "生产模数", isNull, 0, 255);
        }
        if ("qualifiedMoldCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "合格品数", isNull, 0, 255);
        }
        if ("concessionalReceivingCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "让步接收数", isNull, 0, 255);
        }
        if ("perCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "每模件数", isNull, 0, 255);
        }
        if ("moldWeight".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "单模重量（KG)", isNull, 0, 255);
        }
        if ("productionTakt".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "生产节拍（S)", isNull, 0, 255);
        }
        if ("materialSpec".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料规格", isNull, 0, 255);
        }
        if ("materialReceiveCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料领用数", isNull, 0, 255);
        }
        if ("materialReturnCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料退库数", isNull, 0, 255);
        }
        if ("materialConsumeCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料消耗数", isNull, 0, 255);
        }
        if ("materialExceptionCount".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料异常说明", isNull, 0, 255);
        }
        if ("cartonSpec".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "纸箱规格", isNull, 0, 255);
        }
        if ("cartonReceiveCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "纸箱领用数", isNull, 0, 255);
        }
        if ("cartonReturnCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "纸箱退库数", isNull, 0, 255);
        }
        if ("cartonConsumeCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "纸箱消耗数", isNull, 0, 255);
        }
        if ("cartonExceptionCount".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "纸箱异常说明", isNull, 0, 255);
        }
        if ("packingbagSpec".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "包装袋规格", isNull, 0, 255);
        }
        if ("packingbagReceiveCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "包装袋领用数", isNull, 0, 255);
        }
        if ("packingbagReturnCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "包装袋退库数", isNull, 0, 255);
        }
        if ("packingbagConsumeCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "包装袋消耗数", isNull, 0, 255);
        }
        if ("packingbagExceptionCount".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "包装袋异常说明", isNull, 0, 255);
        }
        if ("materialName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料名称/牌号", isNull, 0, 255);
        }
        if ("dryingTemperature".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "烘料温度", isNull, 0, 255);
        }
        if ("dryingTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "烘料时间", isNull, 0, 255);
        }
        if ("storageEndPoint".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "储料终点位置", isNull, 0, 255);
        }
        if ("dwellTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "保压时间", isNull, 0, 255);
        }
        if ("dwellPressure".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "保压压力", isNull, 0, 255);
        }
        if ("dwellSpeed".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "保压速度", isNull, 0, 255);
        }
        if ("collingTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "冷却时间", isNull, 0, 255);
        }
        if ("moldTemperature".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模温", isNull, 0, 255);
        }
        if ("hotRunnerTemperature".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "热流道温度", isNull, 0, 255);
        }
        if ("ejectionEjectionParams".equals(key)) {
            result += CheckUtil.checkJSONArray(JSONArray.parseArray(JSON.toJSONString(value)), "射胶参数对象数组) Ejectio", isNull);
        }
        if ("screwTemperature".equals(key)) {
            result += CheckUtil.checkJSONArray(JSONArray.parseArray(JSON.toJSONString(value)), "螺杆温度", isNull);
        }
        if ("sequentialValveFeedingMode".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num
            result += CheckUtil.checkJSONArray(JSONArray.parseArray(JSON.toJSONString(value)), "顺序阀进胶方式", isNull, 1000, 2, 1, 0, 10000);
        }
        if ("unloaTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "下模时间（H)", isNull, 0, 255);
        }
        if ("noteId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单Id", isNull, 0, 255);
        }
        if ("reportName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "名称", isNull, 0, 255);
        }
        if ("serialNumber".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "编号", isNull, 0, 255);
        }
        if ("versionId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "版本Id", isNull, 0, 255);
        }
        if ("tryOutDate".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "试模日期", isNull);
            }
        }
        if ("projectName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "项目名称", isNull, 0, 255);
        }
        if ("moldId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具编号", isNull, 0, 255);
        }
        if ("tryOutDevice".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模设备", isNull, 0, 255);
        }
        if ("tryOutTimes".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模次数", isNull, 0, 255);
        }
        if ("tryOutTypeId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "试模类型Id", isNull, "0", "255");
        }
        if ("tryOutCompanyId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "试模单位Id", isNull, "0", "255");
        }
        if ("tryOutEngineer".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模调试工程师", isNull, 0, 255);
        }
        if ("projectManager".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "项目工程师", isNull, 0, 255);
        }
        if ("loadTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "上模等待用时（H）", isNull, 0, 255);
        }
        if ("waitTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "等待总时数（H）", isNull, 0, 255);
        }
        if ("breakdownTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "设备故障用时（H）", isNull, 0, 255);
        }
        if ("fixTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "修模用时（H）", isNull, 0, 255);
        }
        if ("debugTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "调试用时（H）", isNull, 0, 255);
        }
        if ("demoProduceTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "样件生产时间（H）", isNull, 0, 255);
        }
        if ("msg".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "返回消息", isNull, 0, 255);
        }
        if ("code".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "状态码", isNull, "0", "100000");
        }
        if ("success".equals(key)) {
            // 判断参数类型: String  num boolean datetime
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String getTryOutRecordSC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("noteId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单Id", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String getTryOutRecordAC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("loadTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "上模用时", isNull, 0, 255);
        }
        if ("noteId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单Id", isNull, 0, 255);
        }
        if ("demoProduceStarttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "样件生产开始时间", isNull);
            }
        }
        if ("demoProduceEndtime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "样件生产结束时间", isNull);
            }
        }
        if ("unloadStarttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "下模开始时间", isNull);
            }
        }
        if ("unloadEndtime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "下模结束时间", isNull);
            }
        }
        if ("noteId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单Id", isNull, 0, 255);
        }
        if ("code".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "状态码", isNull, "0", "100000");
        }
        if ("msg".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "返回消息", isNull, 0, 255);
        }
        if ("success".equals(key)) {
            // 判断参数类型: String  num boolean datetime
        }
        if ("reachedTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "模具到达时间", isNull);
            }
        }
        if ("loadStarttime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "上模开始时间", isNull);
            }
        }
        if ("waitStarttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "等待开始时间", isNull);
            }
        }
        if ("loadEndttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "上模结束时间", isNull);
            }
        }
        if ("waitEndtime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "等待结束时间", isNull);
            }
        }
        if ("breakdownStarttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "设备故障开始时间", isNull);
            }
        }
        if ("breakdownEndtime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "设备故障结束时间", isNull);
            }
        }
        if ("fixStarttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "修模开始时间", isNull);
            }
        }
        if ("fixEndtime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "修模结束时间", isNull);
            }
        }
        if ("debugStarttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "调试开始时间", isNull);
            }
        }
        if ("debugEndTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:null";
            } else {
                result += CheckUtil.checkDate(date, "调试结束时间", isNull);
            }
        }
        if ("unloadTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "下模用时", isNull, 0, 255);
        }
        if ("demoProduceTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "样件生产用时", isNull, 0, 255);
        }
        if ("debugTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "调试用时", isNull, 0, 255);
        }
        if ("fixTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "修模用时", isNull, 0, 255);
        }
        if ("breakDownTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "设备故障用时", isNull, 0, 255);
        }
        if ("waitTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "等待用时", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String getTryOutRecordListSC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("username".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "项目负责人", isNull, 0, 255);
        }
        if ("moldName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具名称", isNull, 0, 255);
        }
        if ("noteId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单Id", isNull, 0, 255);
        }
        if ("pageNum".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "页码", isNull, "0", "255");
        }
        if ("pageSize".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "每页数量", isNull, "1", "255");
        }
        if ("moldId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具编号", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String getTryOutRecordListAC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("tongName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模工", isNull, 0, 255);
        }
        if ("moldId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具编号", isNull, 0, 255);
        }
        if ("code".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "状态码", isNull, "0", "100000");
        }
        if ("msg".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "返回消息", isNull, 0, 255);
        }
        if ("success".equals(key)) {
            // 判断参数类型: String  num boolean datetime
        }
        if ("recordCount".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模次数", isNull, 0, 255);
        }
        if ("noteName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单名称", isNull, 0, 255);
        }
        if ("noteId".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单Id", isNull, 0, 255);
        }
        if ("projectName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "项目负责人", isNull, 0, 255);
        }
        if ("status".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "提交状态", isNull, "0", "1");
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String addTryOutRecordSC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("reachedTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "模具到达时间", isNull);
            }
        }
        if ("loadStarttime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "上模开始时间", isNull);
            }
        }
        if ("waitStarttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "等待开始时间", isNull);
            }
        }
        if ("loadEndttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "上模结束时间", isNull);
            }
        }
        if ("waitEndtime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "等待结束时间", isNull);
            }
        }
        if ("breakdownStarttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "设备故障开始时间", isNull);
            }
        }
        if ("breakdownEndtime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "设备故障结束时间", isNull);
            }
        }
        if ("fixStarttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "修模开始时间", isNull);
            }
        }
        if ("fixEndtime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "修模结束时间", isNull);
            }
        }
        if ("debugStarttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "调试开始时间", isNull);
            }
        }
        if ("debugEndTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "调试结束时间", isNull);
            }
        }
        if ("demoProduceStarttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "样件生产开始时间", isNull);
            }
        }
        if ("demoProduceEndtime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "样件生产结束时间", isNull);
            }
        }
        if ("unloadStarttime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "下模开始时间", isNull);
            }
        }
        if ("unloadEndtime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            Date date = DateUtils.parseStringTimeToDate(value == null ? "" : value.toString());
            if (date == null) {
                result += "时间格式错误:" + (value == null ? "" : value).toString();
            } else {
                result += CheckUtil.checkDate(date, "下模结束时间", isNull);
            }
        }
        if ("noteId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单Id", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String addTryOutRecordAC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("code".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "状态码", isNull, "0", "100000");
        }
        if ("msg".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "返回消息", isNull, 0, 255);
        }
        if ("success".equals(key)) {
            // 判断参数类型: String  num boolean datetime
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String addTryOutReportSC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("noteId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单Id", isNull, 0, 255);
        }
        if ("reportName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "名称", isNull, 0, 255);
        }
        if ("serialNumber".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "编号", isNull, 0, 255);
        }
        if ("versionId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "版本Id", isNull, 0, 255);
        }
        if ("tryOutDate".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模日期", isNull, 0, 255);
        }
        if ("projectName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "项目名称", isNull, 0, 255);
        }
        if ("moldId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模具编号", isNull, 0, 255);
        }
        if ("tryOutDevice".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模设备", isNull, 0, 255);
        }
        if ("tryOutTimes".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模次数", isNull, 0, 255);
        }
        if ("tryOutTypeId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模类型Id", isNull, 0, 255);
        }
        if ("tryOutCompanyId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模单位Id", isNull, 0, 255);
        }
        if ("tryOutEngineer".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "试模调试工程师", isNull, 0, 255);
        }
        if ("projectManager".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "项目工程师", isNull, 0, 255);
        }
        if ("loadTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "上模等待用时（H）", isNull, 0, 255);
        }
        if ("waitTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "等待总时数（H）", isNull, 0, 255);
        }
        if ("breakdownTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "设备故障用时（H）", isNull, 0, 255);
        }
        if ("fixTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "修模用时（H）", isNull, 0, 255);
        }
        if ("debugTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "调试用时（H）", isNull, 0, 255);
        }
        if ("demoProduceTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "样件生产时间（H）", isNull, 0, 255);
        }
        if ("unloaTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "下模时间（H)", isNull, 0, 255);
        }
        if ("totalTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "当天合计用时总数(H)", isNull, 0, 255);
        }
        if ("costTimeRemark".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "用时记录备注", isNull, 0, 255);
        }
        if ("exceptionPeriod".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "开始结束时间段（H）", isNull, 0, 255);
        }
        if ("exceptionHour".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "时间（H）", isNull, 0, 255);
        }
        if ("waitDetailContent".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "等待详细内容", isNull, 0, 255);
        }
        if ("fixDetialContent".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "修模详细内容", isNull, 0, 255);
        }
        if ("breakdownDetialContent".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "设备故障内容", isNull, 0, 255);
        }
        if ("exceptionRemark".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "异常时间记录备注", isNull, 0, 255);
        }
        if ("debugMoldCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "调试模数", isNull, 0, 255);
        }
        if ("produceMoldCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "生产模数", isNull, 0, 255);
        }
        if ("qualifiedMoldCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "合格品数", isNull, 0, 255);
        }
        if ("concessionalReceivingCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "让步接收数", isNull, 0, 255);
        }
        if ("perCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "每模件数", isNull, 0, 255);
        }
        if ("moldWeight".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "单模重量（KG)", isNull, 0, 255);
        }
        if ("productionTakt".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "生产节拍（S)", isNull, 0, 255);
        }
        if ("materialSpec".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料规格", isNull, 0, 255);
        }
        if ("materialReceiveCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料领用数", isNull, 0, 255);
        }
        if ("materialReturnCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料退库数", isNull, 0, 255);
        }
        if ("materialConsumeCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料消耗数", isNull, 0, 255);
        }
        if ("materialExceptionCount".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料异常说明", isNull, 0, 255);
        }
        if ("cartonSpec".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "纸箱规格", isNull, 0, 255);
        }
        if ("cartonReceiveCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "纸箱领用数", isNull, 0, 255);
        }
        if ("cartonReturnCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "纸箱退库数", isNull, 0, 255);
        }
        if ("cartonConsumeCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "纸箱消耗数", isNull, 0, 255);
        }
        if ("cartonExceptionCount".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "纸箱异常说明", isNull, 0, 255);
        }
        if ("packingbagSpec".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "包装袋规格", isNull, 0, 255);
        }
        if ("packingbagReceiveCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "包装袋领用数", isNull, 0, 255);
        }
        if ("packingbagReturnCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "包装袋退库数", isNull, 0, 255);
        }
        if ("packingbagConsumeCount".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "包装袋消耗数", isNull, 0, 255);
        }
        if ("packingbagExceptionCount".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "包装袋异常说明", isNull, 0, 255);
        }
        if ("materialName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "材料名称/牌号", isNull, 0, 255);
        }
        if ("dryingTemperature".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "烘料温度", isNull, 0, 255);
        }
        if ("dryingTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "烘料时间", isNull, 0, 255);
        }
        if ("storageEndPoint".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "储料终点位置", isNull, 0, 255);
        }
        if ("dwellTime".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "保压时间", isNull, 0, 255);
        }
        if ("dwellPressure".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "保压压力", isNull, 0, 255);
        }
        if ("dwellSpeed".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "保压速度", isNull, 0, 255);
        }
        if ("collingTime".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "冷却时间", isNull, 0, 255);
        }
        if ("moldTemperature".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "模温", isNull, 0, 255);
        }
        if ("hotRunnerTemperature".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "热流道温度", isNull, 0, 255);
        }
        if ("ejectionEjectionParams".equals(key)) {
            result += CheckUtil.checkJSONArray(JSONArray.parseArray(JSON.toJSONString(value)), "射胶参数对象数组) Ejectio", isNull);
        }
        if ("ejectionTempresure".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "压力", isNull, 0, 255);
        }
        if ("ejectionSpeed".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "速度", isNull, 0, 255);
        }
        if ("ejectionposition".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "位置", isNull, 0, 255);
        }
        if ("ejectionStageName".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "阶段号", isNull, 0, 255);
        }
        if ("screwTemperature".equals(key)) {
            result += CheckUtil.checkJSONArray(JSONArray.parseArray(JSON.toJSONString(value)), "螺杆温度", isNull);
        }
        if ("stageName".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "阶段号", isNull, 0, 255);
        }
        if ("temperatureValue".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "每阶段螺杆温度值", isNull, 0, 255);
        }
        if ("sequentialValveFeedingMode".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num
            result += CheckUtil.checkJSONArray(JSONArray.parseArray(JSON.toJSONString(value)), "顺序阀进胶方式", isNull, 1000, 2, 1, 0, 10000);

        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String addTryOutReportAC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("code".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "状态码", isNull, "0", "100000");
        }
        if ("msg".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "返回消息", isNull, 0, 255);
        }
        if ("success".equals(key)) {
            // 判断参数类型: String  num boolean datetime
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String postTryOutReportSC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("noteId".equals(key)) {
            isNull = true;
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "通知单Id", isNull, 0, 255);
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String postTryOutReportAC(String key, Object value, Set<String> set) {
        String result = "";
        Boolean isNull = false;
        if ("code".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "状态码", isNull, "0", "100000");
        }
        if ("msg".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkString(value == null ? "" : value.toString(), "返回消息", isNull, 0, 255);
        }
        if ("success".equals(key)) {
            // 判断参数类型: String  num boolean datetime
        }
        if ("status".equals(key)) {
            // 判断参数类型: String  num boolean datetime
            result += CheckUtil.checkBigDecimal(value == null ? "" : value.toString(), "试模记录状态", isNull, "0", "1");
        }
        if (isNull) {
            set.add(key);
        }
        return result;
    }

    private static String getTryOutReportACS(Set<String> set) {
        List<String> list = new ArrayList<>();
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "入参");
    }

    private static String getTryOutReportACB(Set<String> set) {
        List<String> list = new ArrayList<>();
        list.add("tryOutDate");
        list.add("packingbagReturnCount");
        list.add("dwellPressure");
        list.add("packingbagSpec");
        list.add("packingbagReceiveCount");
        list.add("hotRunnerTemperature");
        list.add("moldId");
        list.add("storageEndPoint");
        list.add("moldTemperature");
        list.add("serialNumber");
        list.add("totalTime");
        list.add("moldWeight");
        list.add("materialReceiveCount");
        list.add("noteId");
        list.add("exceptionHour");
        list.add("materialName");
        list.add("versionId");
        list.add("productionTakt");
        list.add("perCount");
        list.add("projectName");
        list.add("dwellSpeed");
        list.add("dwellTime");
        list.add("temperatureValue");
        list.add("projectManager");
        list.add("dryingTemperature");
        list.add("reportName");
        list.add("materialConsumeCount");
        list.add("produceMoldCount");
        list.add("dryingTime");
        list.add("debugMoldCount");
        list.add("cartonConsumeCount");
        list.add("tryOutTimes");
        list.add("cartonReturnCount");
        list.add("cartonSpec");
        list.add("tryOutCompanyId");
        list.add("concessionalReceivingCount");
        list.add("unloaTime");
        list.add("materialSpec");
        list.add("qualifiedMoldCount");
        list.add("cartonReceiveCount");
        list.add("tryOutEngineer");
        list.add("ejectionposition");
        list.add("ejectionStageName");
        list.add("tryOutTypeId");
        list.add("exceptionPeriod");
        list.add("materialReturnCount");
        list.add("packingbagConsumeCount");
        list.add("ejectionSpeed");
        list.add("collingTime");
        list.add("sequentialValveFeedingMode");
        list.add("tryOutDevice");
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "出参");
    }

    private static String getTryOutRecordACS(Set<String> set) {
        List<String> list = new ArrayList<>();
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "入参");
    }

    private static String getTryOutRecordACB(Set<String> set) {
        List<String> list = new ArrayList<>();
        list.add("unloadEndtime");
        list.add("reachedTime");
        list.add("loadStarttime");
        list.add("noteId");
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "出参");
    }

    private static String getTryOutRecordListACS(Set<String> set) {
        List<String> list = new ArrayList<>();
        list.add("pageSize");
        list.add("pageNum");
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "入参");
    }

    private static String getTryOutRecordListACB(Set<String> set) {
        List<String> list = new ArrayList<>();
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "出参");
    }

    private static String addTryOutRecordACS(Set<String> set) {
        List<String> list = new ArrayList<>();
        list.add("reachedTime");
        list.add("unloadEndtime");
        list.add("loadStarttime");
        list.add("noteId");
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "入参");
    }

    private static String addTryOutRecordACB(Set<String> set) {
        List<String> list = new ArrayList<>();
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "出参");
    }

    private static String addTryOutReportACS(Set<String> set) {
        List<String> list = new ArrayList<>();
        list.add("tryOutDate");
        list.add("packingbagReturnCount");
        list.add("dwellPressure");
        list.add("packingbagSpec");
        list.add("packingbagReceiveCount");
        list.add("hotRunnerTemperature");
        list.add("moldId");
        list.add("storageEndPoint");
        list.add("moldTemperature");
        list.add("serialNumber");
        list.add("totalTime");
        list.add("moldWeight");
        list.add("materialReceiveCount");
        list.add("noteId");
        list.add("exceptionHour");
        list.add("materialName");
        list.add("versionId");
        list.add("productionTakt");
        list.add("perCount");
        list.add("projectName");
        list.add("dwellSpeed");
        list.add("dwellTime");
        list.add("temperatureValue");
        list.add("projectManager");
        list.add("reportName");
        list.add("dryingTemperature");
        list.add("materialConsumeCount");
        list.add("produceMoldCount");
        list.add("dryingTime");
        list.add("debugMoldCount");
        list.add("cartonConsumeCount");
        list.add("tryOutTimes");
        list.add("cartonReturnCount");
        list.add("cartonSpec");
        list.add("tryOutCompanyId");
        list.add("unloaTime");
        list.add("concessionalReceivingCount");
        list.add("materialSpec");
        list.add("qualifiedMoldCount");
        list.add("cartonReceiveCount");
        list.add("tryOutEngineer");
        list.add("ejectionposition");
        list.add("ejectionStageName");
        list.add("tryOutTypeId");
        list.add("exceptionPeriod");
        list.add("materialReturnCount");
        list.add("packingbagConsumeCount");
        list.add("ejectionSpeed");
        list.add("tryOutDevice");
        list.add("collingTime");
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "入参");
    }

    private static String addTryOutReportACB(Set<String> set) {
        List<String> list = new ArrayList<>();
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "出参");
    }

    private static String postTryOutReportACS(Set<String> set) {
        List<String> list = new ArrayList<>();
        list.add("noteId");
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "入参");
    }

    private static String postTryOutReportACB(Set<String> set) {
        List<String> list = new ArrayList<>();
        if (set.size() == list.size()) {
            return "";
        }
        return getCollectionDifferentValue(list, set, "出参");
    }

    /**
     * 获取集合中的不同值
     *
     * @param list
     * @param set
     * @return
     */
    private static String getCollectionDifferentValue(List<String> list, Set<String> set, String flag) {
        String result = "";
        for (String str : list) {
            if (!set.contains(str)) {
                result += str + ",";
            }
        }
        if (StringUtils.isNotEmpty(result)) {
            result = StringUtils.strip(result, ",");
            result = "---" + flag + ":" + result + "为必填参数";
        }
        return result;
    }
}
